@import '@/less/common.less';

page {
  padding: 20px 20px 100px;
}

.index {
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  .safe-area();

  .tabbar {
    z-index: 9;
    position: fixed;
    bottom: 0;
    left: 0;
    .safe-area();
    .shadow();
    width: 100%;
    background-color: #ffffff;

    .container {
      padding: 20px 60px;
      display: flex;
      justify-content: space-between;

      .item:nth-child(1) {
        color: #ee0a24;
      }

      .item:nth-child(2) {
        color: #ee0a24;
      }

      .no-hover {
        background-color: transparent;
      }
    }

  }

  .message-input {
    z-index: 10;
    .shadow();
    .safe-area();
    background-color: #ffffff;
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;

    .container {
      display: flex;
      padding: 20px 20px;

      textarea {
        background-color: #f7f8fa;
        border-radius: 30px;
        padding: 10px var(--cell-horizontal-padding, 32rpx);
      }

      .btn-submit {
        padding: 10rpx 30rpx;
        .flex-center();
        flex-shrink:0;
        background-color: #ffffff;
        color: @themeColor;
        .radius();
      }
    }
  }

  .recipe-info {
    .m-image {
      Image {
        width: 100%;
        height: 500px;
        .radius();
        .shadow();
        transition: all .6s;
      }
    }

    .m-title {
      margin-top: 20px;
      font-size: 50px;
      font-weight: bold;
      text-align: center;

      Text {
        display: inline-block;
        text-align: left;
      }
    }

    .m-desc {
      margin-top: 20px;
      .flex-center();
      font-size: 30px;
      color: #999999;

      Text {
        .flex-center();

        &:nth-child(2)::before,
        &:nth-child(3)::before {
          content: '';
          width: 7px;
          height: 7px;
          margin: 0 15px;
          display: block;
          background-color: #999;
          border-radius: 50%;
        }
      }
    }

    .date-heat {
      margin-top: 20px;
      .flex();
      justify-content: space-between;
      font-size: 30px;
      color: #999999;
    }

    .hr {
      .hr();
    }

    .m-author {
      .flex-center();
      padding: 0 50px;

      Image {
        width: 100px;
        height: 100px;
        margin-right: 20px;
        border-radius: 50%;
      }

      .name {
        .omit();
        flex: 1;
        font-size: 35px;
      }

      .btn-follow {
        width: 150px;
        height: 80px;
        display: flex;
        justify-content: center;
        align-items: center;
        border: 2rpx solid @themeColor;
        border-radius: 10rpx;
        color: @themeColor;
        &.disable{
          border-color: #999999;
          background-color: #dddddd;
          color: #999999;
        }
      }
    }

    .m-material {
      width: 90%;
      margin: 0 auto;

      .top {
        margin: 20px 0;
        text-align: center;
        font-weight: 600;
        font-size: 30px;
      }

      .join-basket {
        margin-bottom: 20px;
        display: flex;
        justify-content: flex-end;

        Text {
          font-size: 25px;
          color: #666666;
          padding: 10px 30px;
          .flex-center();
          border: 2px solid #666666;
          border-radius: 30px;
        }
      }

      .list {

        .item {
          display: flex;
          align-items: center;
          padding: 20px 0;
          font-size: 30px;
          border-top: 1px dashed #dddddd;
          Text {
            word-break:break-all;
            flex: 1;

            &:nth-child(2) {
              text-align: right;

              .amount {
                margin-right: 10px;
              }
            }
          }
        }

        .btn-group {
          display: flex;
          justify-content: space-between;
          align-items: center;
          border-top: 1px dashed #dddddd;
          padding: 20px 0;

          .quantity {
            font-weight: bold
          }

          .btn-q {
            .btn();
            color: #999999;
            border-color: #999999;

            &.active {
              color: #e0620d;
              border-color: #e0620d;
            }
          }
        }

        border-bottom: 1px solid #dddddd;
      }
    }

    .m-step {
      .item {
        &:not(:last-child) {
          border-bottom: 1px solid #dddddd;
        }

        .step-num {
          font-size: 35px;
          font-weight: 600;
          margin: 15px 0;
        }

        .step-img {
          text-align: center;
          padding: 0 20px;

          Image {
            width: 100%;
            .radius();
            .shadow();
          }
        }

        .step-text {
          padding: 0 20px;
          margin: 20px 0;
          font-size: 30px;
        }
      }
    }

    .m-tip {
      background-color: #eeeeee;

      .title {
        font-size: 33px;
      }

      .taro_html {
        margin-top: 30px;
        padding: 0 20px;
      }

      .radius();
      font-size: 30px;
      font-weight: 600;
      padding: 20px;
      color: #333333;
    }
  }

  .m-comment {
    .title {
      font-size: 33px;
      font-weight: 600;
      margin-bottom: 20px;
    }

    .list {
      padding: 0px 20px;

      .parent {
        &:not(:last-child) {
          border-bottom: 1px solid #dddddd;
        }

        padding: 20px 0;

        .node {
          display: flex;
        }

        .c-left {
          Image {
            width: 80px;
            height: 80px;
            border-radius: 50%;
          }
        }

        .c-right {
          margin-left: 20px;
          display: flex;
          flex: 1;
          flex-direction: column;

          .c-name {
            margin-top: 10px;
            color: #666666;
            font-size: 28px;
          }

          .c-date {
            color: #888888;
            font-size: 20px;
          }

          .c-content {
            font-size: 30px;
            color: #333333;
            display: flex;
            justify-content: space-between;

            Text {
              width: 100%;
              flex: 1;
            }

            .msg-del {
              color: #ee0a24;
            }
          }

          .c-thumbs {
            // color: #888888;
            font-size: 20px;
            display: flex;
            align-items: flex-end;

            Text {
              margin-left: 10px;
            }
          }
        }
      }

      .child-list {
        background-color: #eeeeee;
        padding: 5px 15px;
        margin: 20px auto 0 80px;
        max-height: 500px;
        overflow-y: auto;
        .radius();

        .child {
          .node {
            display: flex;
          }

          .c-right {
            margin-left: 0px;
            display: flex;
            flex-direction: column;

            .c-name {
              margin-top: 10px;
              color: #666666;
              font-size: 28px;

              .u-link {
                color: #20a0ff;
              }
            }

            .c-date {
              color: #888888;
              font-size: 20px;
            }

            .c-content {
              font-size: 30px;
              color: #333333;
            }

            .c-thumbs {
              // color: #888888;
              font-size: 20px;
              display: flex;
              align-items: flex-end;

              Text {
                margin-left: 10px;
              }
            }
          }
        }
      }

    }
  }

  .basket-position {
    z-index: -1;
    width: 80px;
    height: 80px;
    position: fixed;
    left: 10px;
    z-index: -1;
  }

  .rate {
    .flex-center();
    margin: 30px 0;
    position: relative;

    .text {
      position: absolute;
      font-size: 35px;
      font-weight: 600;
      left: 0;
    }
  }

  .basket {
    &.anim {
      .basket-nav {
        animation: bounce 1s ease both;
      }
    }
  }

  .ball {
    z-index: 888;
    position: absolute;
    background-color: @themeColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: left .6s linear, top .6s cubic-bezier(0.5, -0.5, 1, 1);
  }

}

// 动画

@keyframes bounce {
  0% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.2);
  }

  75% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}
